<template>
	<view class="content">
		
		<view>
			<view v-for="(item,index) in banner" :key="index">
				<text>{{ item.title }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				banner: []
			}
		},
		mounted(){
			console.log("页面初始化");
			uni.request({
				url: 'http://iwenwiki.com/api/blueberrypai/getIndexBanner.php',
				// data: {},
				// header: {
				// 	Accept: 'application/json',
				// 	'Content-Type': 'application/json',
				// 	'X-Requested-With': 'XMLHttpRequest'
				// },
				method: 'GET',
				// sslVerify: true,
				success: (res) => {
					console.log(res);
					this.banner = res.data.banner;
					console.log("this.banner",this.banner);
				},
				fail: (error) => {
					console.log(error);
				}
			})
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
